package com.erp.entity.purchase;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author :qinya
 * @PackageName:com.erp.entity.purchase
 * @ClassName: PurchasePreOrder
 * @Description: 购货订单实体
 * @date : 2025/7/7,11:10
 */
public class PurchasePreOrder {

    private Integer purchasePreOrderId; // 预订单主键
    private String purchasePreOrderCode; // 预订单编码
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date invoiceDate; // 单据日期
    private Integer providerId; // 供应商ID
    private Integer salePersonId; // 销售人员ID

    private BigDecimal purchaseAmount; // 采购金额
    private Integer discountRate; // 折扣率
    private BigDecimal taxAmount; // 税额
    private Integer orderState; // 订单状态
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date deliveryDate; // 交货日期
    private Integer orderMakerId; // 制单人ID
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderCreateDate; // 订单创建日期
    private Integer auditorId; // 审核人ID
    private String remark;// 备注
    private Integer deliveryMethodId; // 交货方式ID
    private Integer companyId; // 公司ID

    // 冗余供应商字段
    private String providerName; // 供应商名称
    private String providerAddress;
    private List<String> purchaseOrderCodeList; // 关联的购货单编码

    private List<PurchasePreOrderDetail> purchasePreOrderDetailList; // 购货订单明细

    public Integer getPurchasePreOrderId() {
        return purchasePreOrderId;
    }

    public void setPurchasePreOrderId(Integer purchasePreOrderId) {
        this.purchasePreOrderId = purchasePreOrderId;
    }

    public String getPurchasePreOrderCode() {
        return purchasePreOrderCode;
    }

    public void setPurchasePreOrderCode(String purchasePreOrderCode) {
        this.purchasePreOrderCode = purchasePreOrderCode;
    }

    public Date getInvoiceDate() {
        return invoiceDate;
    }

    public void setInvoiceDate(Date invoiceDate) {
        this.invoiceDate = invoiceDate;
    }

    public Integer getProviderId() {
        return providerId;
    }

    public void setProviderId(Integer providerId) {
        this.providerId = providerId;
    }

    public Integer getSalePersonId() {
        return salePersonId;
    }

    public void setSalePersonId(Integer salePersonId) {
        this.salePersonId = salePersonId;
    }


    public BigDecimal getPurchaseAmount() {
        return purchaseAmount;
    }

    public void setPurchaseAmount(BigDecimal purchaseAmount) {
        this.purchaseAmount = purchaseAmount;
    }

    public Integer getDiscountRate() {
        return discountRate;
    }

    public void setDiscountRate(Integer discountRate) {
        this.discountRate = discountRate;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }

    public Integer getOrderState() {
        return orderState;
    }

    public void setOrderState(Integer orderState) {
        this.orderState = orderState;
    }

    public Integer getOrderMakerId() {
        return orderMakerId;
    }

    public void setOrderMakerId(Integer orderMakerId) {
        this.orderMakerId = orderMakerId;
    }

    public Date getDeliveryDate() {
        return deliveryDate;
    }

    public void setDeliveryDate(Date deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    public Date getOrderCreateDate() {
        return orderCreateDate;
    }

    public void setOrderCreateDate(Date orderCreateDate) {
        this.orderCreateDate = orderCreateDate;
    }

    public Integer getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(Integer auditorId) {
        this.auditorId = auditorId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getDeliveryMethodId() {
        return deliveryMethodId;
    }

    public void setDeliveryMethodId(Integer deliveryMethodId) {
        this.deliveryMethodId = deliveryMethodId;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public List<PurchasePreOrderDetail> getPurchasePreOrderDetailList() {
        return purchasePreOrderDetailList;
    }

    public void setPurchasePreOrderDetailList(List<PurchasePreOrderDetail> purchasePreOrderDetailList) {
        this.purchasePreOrderDetailList = purchasePreOrderDetailList;
    }

    public String getProviderName() {
        return providerName;
    }

    public void setProviderName(String providerName) {
        this.providerName = providerName;
    }

    public String getProviderAddress() {
        return providerAddress;
    }

    public void setProviderAddress(String providerAddress) {
        this.providerAddress = providerAddress;
    }

    public List<String> getPurchaseOrderCodeList() {
        return purchaseOrderCodeList;
    }

    public void setPurchaseOrderCodeList(List<String> purchaseOrderCodeList) {
        this.purchaseOrderCodeList = purchaseOrderCodeList;
    }

}
